package com.java.springcloud.mybatisplus.base.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.java.springcloud.mybatisplus.base.mapper.TdBaseMapper;
import com.java.springcloud.mybatisplus.base.service.ITdService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
public class TdServiceImpl<M extends TdBaseMapper<T>, T> extends ServiceImpl<M, T> implements ITdService<T> {

    @Autowired
    protected M tdMapper;

    @Override
    public M getBaseMapper() {
        return tdMapper;
    }

    @Override
    public boolean tdInsert(T entity) {
        return retBool(tdMapper.tdInsert(entity));
    }

    @Override
    public boolean tdBatchInsert(List<T> list, T tag) {
        return retBool(tdMapper.tdBatchInsert(list, tag));
    }

    @Override
    public List<T> tdSelectList(Wrapper<T> queryWrapper) {
        return tdMapper.tdSelectList(queryWrapper);
    }

    @Override
    public List<Map<String, Object>> tdSelectMaps(Wrapper<T> queryWrapper) {
        return tdMapper.tdSelectMaps(queryWrapper);
    }
}
